package com.yiyong.myabtis_genetion.exception;

/**
 * 代码生成异常
 *
 * @author yiyong
 */
public final class GenerationCodeException extends RuntimeException {
    private static final long serialVersionUID = 1L;

    /**
     * 错误码
     */
    private Integer code;

    /**
     * 错误提示
     */
    private String message;


    /**
     * 错误的想请
     */
    private String detailMeaasge;

    public GenerationCodeException() {
    }

    public GenerationCodeException(String message, Integer code) {
        super(message);
        this.code = code;
    }

    public Integer getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public String getDetailMeaasge() {
        return detailMeaasge;
    }

    public GenerationCodeException(String message) {
        super(message);
    }

    public GenerationCodeException setMessage(String message) {
        this.message = message;
        return this;
    }

    public GenerationCodeException setDetailMeaasge(String detailMeaasge) {
        this.detailMeaasge = detailMeaasge;
        return this;
    }
}
